package com.baofu.paycore.manager.model;

import lombok.*;

import java.util.Date;

/**
 * 账务充值转账响应
 *
 * @author LZQ
 * @author tiger
 * @version 1.0.0 createTime: 14/12/03 下午5:44
 * @since 1.6
 */
@ToString(callSuper = true)
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ResponseBO {

    /**
     * 状态
     */
    private String status;

    /**
     * 错误码
     */
    private String errorCode;

    /**
     * 错误描述
     */
    private String errorMsg;

    /**
     * 对方交易日期
     */
    private Date oppTrDate;

    /**
     * 对方交易流水号（充值+转账混合接口时为充值凭证号）
     */
    private String oppTrNumber;

    /**
     * 请求流水号
     */
    private String subFundChannel;

    /**
     * 请求流水号
     */
    private String requestNo;

    /**
     * 资金单号（同步交易时必填）
     */
    private String fundProcNo;

    /**
     * 冻结码
     */
    private String freezeCode;

    /**
     * 账户总金额
     */
    private long totalAmt;

    /**
     * 账户可用金额
     */
    private long visibleAmt;

    /**
     * 账户可提现金额
     */
    private long withdrawAmt;

    /**
     * 冻结金额
     */
    private long frozenAmt;

    /**
     * 是否为实际通知结果
     * 默认为受理结果
     */
    private boolean realFlag = false;


    public ResponseBO(String fundProcNo) {
        this.fundProcNo = fundProcNo;
    }

    public ResponseBO(String status, String errorCode, String errorMsg, Date oppTrDate, String oppTrNumber,
                      String requestNo,boolean realFlag) {
        this.status = status;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.oppTrDate = oppTrDate;
        this.oppTrNumber = oppTrNumber;
        this.requestNo = requestNo;
        this.realFlag = realFlag;
    }

    public ResponseBO(String status, String errorCode, String errorMsg, Date oppTrDate, String oppTrNumber,
                      String requestNo, String freezeCode, boolean realFlag) {
        this.status = status;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.oppTrDate = oppTrDate;
        this.oppTrNumber = oppTrNumber;
        this.requestNo = requestNo;
        this.freezeCode = freezeCode;
        this.realFlag = realFlag;
    }

    public ResponseBO(String status, String errorCode, String errorMsg, Date oppTrDate, String oppTrNumber,
                      String requestNo,long totalAmt,long visibleAmt,long withdrawAmt,long frozenAmt, boolean realFlag) {
        this.status = status;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.oppTrDate = oppTrDate;
        this.oppTrNumber = oppTrNumber;
        this.requestNo = requestNo;
        this.totalAmt = totalAmt;
        this.visibleAmt = visibleAmt;
        this.withdrawAmt = withdrawAmt;
        this.frozenAmt = frozenAmt;
        this.realFlag = realFlag;
    }

    public ResponseBO(String status, String errorCode, String errorMsg, String oppTrNumber) {
        this.status = status;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.oppTrNumber = oppTrNumber;
    }

    public ResponseBO(String status, String errorCode, String errorMsg, String fundProcNo,
                      boolean realFlag) {
        this.status = status;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.fundProcNo = fundProcNo;
        this.realFlag = realFlag;
    }

    public ResponseBO(String status, String freezeCode, String errorCode, String errorMsg, String fundProcNo,
                      boolean realFlag) {
        this.status = status;
        this.freezeCode = freezeCode;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.fundProcNo = fundProcNo;
        this.realFlag = realFlag;
    }

}
